import { Component, OnInit, Input } from '@angular/core';
import { AppGlobalService } from '../../shared/service/app-global.service';

@Component({
  selector: 'app-finishcompany-list',
  templateUrl: './finishcompany-list.component.html',
  styleUrls: ['./finishcompany-list.component.scss'],
})
export class FinishcompanyListComponent implements OnInit {
  @Input() tagData: any;
  constructor(private appGlobalService: AppGlobalService) { }

  ngOnInit() {
    console.log(this.tagData);
    /* this.tagData = {
      "type": "tag",
      "style": "appMessageInfoListTag",
      "name": null,
      "linearLayout": "body",
      "data": [
        {
          "images": {
            "imageUrl": "",
            "isAuthenticated": {
              "label": "会员",
              "value": false
            }
          },
          "backIcon": "../../../assets/img/companyicon.png",
          "link": {
            "type": "page",
            "params": {
              "opportunity_id": "5e143adc97110b0001488a19",
              "customer_id": "5e143adc97110b0001488a18"
            },
            "target": "142842"
          },
          "title": "",
          "info": ""
        }
      ]
    } */
  }
  // 点击跳转进入详情
  companyclick(obj) {
    if (obj) {
      const pageParams = {
        pageId: obj.target,
        params: obj.params,
        sessionId: localStorage.getItem('sessionId')
      };
      console.log(pageParams);
      this.appGlobalService.goToForward(pageParams);
    }
  }
}
